package 华为OD机试B卷复用题.基础题;

import utils.MyUtil;

import java.io.File;
import java.io.FileNotFoundException;
import java.util.Scanner;

public class HJ48_拼接URL {
    public static void main(String[] args) throws FileNotFoundException {
        Scanner in = new Scanner(new File("src/main/java/华为OD机试B卷复用题/基础题/input/48.txt"));
        MyUtil.START();
        Solution(in);
        MyUtil.END();
    }

    static void Solution(Scanner in) {
        String s1 = "fda/";
        String s2 = "gszd";
        s1.replace("/", "");
        if (s1.charAt(s1.length() - 1) == '/') {
            s1 = s1.substring(0, s1.length() - 1);
        }
        s2.replace("/", "");
        String result = "";
        if (s1.length() == 0 && s2.length() == 0) {
            System.out.println("/");
            return;
        }
        if (s1.length() > 0) {
            result += "/" + s1;
        }
        if (s2.length() > 0) {
            result += "/" + s2;
        }
        System.out.println(result);
    }
}
